import Vue from 'vue'
import VueRouter from 'vue-router'
import MyHome from '@/views/MyHome.vue'
import MyNews from '@/views/MyNews.vue'
import MySports from '@/views/MySports.vue'
import SportHome from '@/views/SportHome.vue'
import InternalSport from '@/views/InternalSport.vue'
import ForeignSport from '@/views/ForeignSport.vue'

Vue.use(VueRouter)

const router = new VueRouter({
  routes: [
    {path:'/',redirect:'/home'},
    {path:'/home',component:MyHome},
    {path:'/news',component:MyNews},
    {
      path: '/sports',
      component: MySports,
      // redirect:'/sports/sporthome',
      children: [
      {path:'',component:SportHome},
      {path:'internalsport',component:InternalSport},
      {path:'foreignsport',component:ForeignSport},
    ]},
  ]
})

export default router